package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//等价于<bean id="user" class="com.kuang.pojo.User">
@Component
//标注单例，模式
@Scope("singleton")
public class User {
//    等价于<property name="name" value="豆包二号">
    @Value("豆包二号")
    public  String name;
}
